use chrono::{DateTime, Duration, Utc};

/// 根据频率计算下一次提醒时间
pub fn calculate_next_reminder(current: DateTime<Utc>, frequency: &str) -> Option<DateTime<Utc>> {
    match frequency {
        "daily" => Some(current + Duration::days(1)),
        "weekly" => Some(current + Duration::weeks(1)),
        "monthly" => {
            // 粗略计算，加30天
            Some(current + Duration::days(30))
        }
        "yearly" => {
            // 粗略计算，加365天
            Some(current + Duration::days(365))
        }
        "once" => None,
        _ => None,
    }
}
